/********************************
 *版权所有 CopyRight(c) 快程乐码信息有限公司所有，未经授权，不得复制、转发
 */
package com.yjx.test.dozer;

import com.yjx.test.dozer.entity.Account;
import com.yjx.test.dozer.entity.Name;
import com.yjx.test.dozer.utils.DataConvertor;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.time.LocalDate;
import java.util.HashMap;

/************
 *@Author yejx
 *@version v1.0
 *@create 2020/7/1 21:19
 *@Description TODO
 *
 */
@SpringBootTest
public class DozerApplicationTest4 {

    @Autowired
    DataConvertor dataConvertor;

    @Test
    public void mapConvertor() {
        //    Account account = new Account(1, "叶建雄", "123456", 12.99, LocalDate.of(1996, 9, 28));
        Name name = new Name("叶", "建", "叶建雄");
        HashMap convertor = dataConvertor.convertor(name, HashMap.class);
        convertor.forEach((x, y) -> {
            System.out.println(x + "《||||||||||||》" + y);
        });


    }


}
